package server

import (
	"net"
	"robot/study/LiveRobot/api/server/http"
	"robot/study/LiveRobot/sdk/zlog"
)

//Start 启动
func Start() {
	listen, err := net.Listen("tcp", "127.0.0.1:5701")
	if err != nil {
		zlog.Error("服务器监听失败", err)
		return
	}
	for {
		conn, err := listen.Accept()
		if err != nil {
			zlog.Error("链接失败", err)
			continue
		}
		//向各个模块发送消息
		go http.Process(conn)
	}
}

// Exit 退出
func Exit() {

}
